//
//  PublishingLoginView.m
//  夺宝吧
//
//  Created by xiaocai on 15/7/1.
//  Copyright (c) 2015年 FangYuan. All rights reserved.
//

#import "PublishingLoginView.h"
#import "HistoryNumView.h"

@interface PublishingLoginView ()
{
    __weak IBOutlet UILabel *jxzLab;
    __weak IBOutlet UILabel *titleLab;
    __weak IBOutlet UIView *bgView;
    __weak IBOutlet UIButton *jsBtn;
    __weak IBOutlet UILabel *numLab;
    __weak IBOutlet UIView *bgView2;
    __weak IBOutlet UIButton *showBtn;
}
@end
@implementation PublishingLoginView

- (void)awakeFromNib
{
    jxzLab.textColor = QBB_RED_COLOR;
    jxzLab.layer.borderWidth = 0.5;
    jxzLab.layer.borderColor = QBB_RED_COLOR.CGColor;
    jxzLab.layer.masksToBounds = YES;
    jxzLab.layer.cornerRadius = 2;
    bgView.layer.cornerRadius = 2;
    bgView.layer.masksToBounds = YES;
    bgView.backgroundColor = QBB_RED_COLOR;
    jsBtn.layer.cornerRadius = 2;
    jsBtn.layer.masksToBounds = YES;
    jsBtn.layer.borderColor = [UIColor whiteColor].CGColor;
    jsBtn.layer.borderWidth = 1;
    bgView.layer.cornerRadius = 2;
    bgView.layer.masksToBounds = YES;
    showBtn.layer.cornerRadius = 2;
    showBtn.layer.masksToBounds = YES;
    showBtn.backgroundColor = QBB_RED_COLOR;
    bgView2.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"Dbb_backColor"]];
}

//填充view数据的方法
- (void)fillViewWithDic:(NSDictionary *)dic
{
    titleLab.text = [NSString stringWithFormat:@"(第%@期)%@",dic[@"goods"][@"qishu"],dic[@"goods"][@"title"]];
    self.pdc_id = dic[@"goods"][@"id"];
    self.pdc_qishu = dic[@"goods"][@"qishu"];
}

//自己的参与号码
- (IBAction)selfCanyuBtn:(id)sender {
    HistoryNumView *his = [[HistoryNumView alloc]initWithPdcId:self.pdc_id AndQiShu:self.pdc_qishu AndTitle:titleLab.text Owner:[UserInfo getUserID]];
    UIWindow *window = [UIApplication sharedApplication].delegate.window;
    [window addSubview:his];
    
}

@end
